Entering ST-Code

Enter your application in the ST-editor by writing code. Neuron Power Engineer provides the following possibilities for entering ST-code:

Possibility

Note

input via keyboard

Neuron Power Engineer highlights the errors so that you are able to create your application in ST correctly and quickly.
However, it is good to have some knowledge about the ST-syntax according to →IEC-standard. If not, see "Supported ST-syntax". This article lists the syntax elements that are supported for the application by Neuron Power Engineer.

content assist 

Content assist is certainly one of the fastest methods to enter code.

copying/cutting existing code and pasting as new code

default features for Copy, Cut and Paste as certainly known from other applications

Refactoring of ST-code

Refactoring is certainly one of the fastest methods to edit the existing code.

dragging and dropping variables from the Instances view

Drag and drop the variable from the view into the body of a POU(ST).
Result: The name of the variable is inserted in the code when this variable exists in the POU. Observe the following:

  1. The inserted name is highlighted as faulty when the resulting line is not a correct ST-code. In this case, fix the line correspondingly.

  2. When you want to undo the insert action, first click onto the ST-editor to focus on the editor. Only then start the undo action.

The next table contains other useful possibilities to enter ST-code and information where to find the appropriate commands in Neuron Power Engineer:

Other possibility

Meaning

command in Neuron Power Engineer

word completion

enter proposal for the started word
The proposal is based on the contents of all opened editors. Select the command repeatedly until the requested proposal appears.

in menu Edit, Word Completion

toggle comment

toggle comment for all currently selected lines
(The delimiter // is inserted resp. removed.)

from context menu in the ST-editor, Source, Toggle Comment

format code

format the code within the current selection
If no code is selected, all code within the editor is formatted. If the ST-code contains errors, formatting is not possible.

from context menu in the ST-editor, SourceFormat

Neuron Power Engineer provides keyboard shortcuts for even more actions in ST-editor to quickly change, delete or select code and to quickly navigate within the ST-editor.